import request from "@/utils/request";
import type { AxiosPromise } from "axios";
import type { SysUserOnline, SysUserOnlineQuery } from "@/api/monitor/online/type";

export function listOnline(query: SysUserOnlineQuery): AxiosPromise<SysUserOnline[]> {
  return request({
    url: "/system/online/list",
    method: "get",
    params: query
  });
}

// 强退用户
export function forceLogout(tokenId: number | string | undefined) {
  return request({
    url: "/system/online/" + tokenId,
    method: "delete"
  });
}
